<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class Animal {
        constructor() {
          this.name = 'jack';
          console.log('hi');
        }
      }
      class Rabit extends Animal {
        constructor() {
          super();
          console.log('hello');
        }
      }
      /*
      extends
      */
      const r = new Rabit();
      // r.constructor()
    </script>
  </body>
</html>
